Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 05-data-structures-part2.Rmd #452

Closed
wants to merge 1 commit into from

Conversation

Malarkey73
Copy link

I think for novices the idea of "names(cats)" a longer vector being %in% c("age") a single character vector is extraneous cognitive load. NB the c() is un-necessary too.
More natural just to ask are the names equal "==". Maybe also change "!drop" to "-drop" as that again is consistent with the previous examples of column selection immediately above.

Please delete the text below before submitting your contribution.


Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.

Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com).


I think for novices the idea of  "names(cats)" a longer vector being %in%  c("age") a single character vector is extraneous cognitive load. NB the c() is un-necessary too. 
More natural just to ask are the names equal "==". Maybe also change "!drop" to "-drop" as that again is consistent with the previous examples of column selection immediately above.
@naupaka
Copy link
Member

naupaka commented Nov 19, 2018

@Malarkey73 thanks for the PR! I agree it could be confusing, but the counterargument is that it enables removal of multiple discontiguous columns. The switch from !drop to -drop is a slightly different issue. Thoughts @jcoliver @mawds ?

@naupaka naupaka added the type:clarification Suggest change for make lesson clearer label Nov 19, 2018
@jcoliver
Copy link
Contributor

Good point @Malarkey73 . The %in% operator is covered more in depth in episode 06, so I agree that using names(cats) == "age" would be appropriate at this point in the lesson. As for -drop vs. !drop...I think keeping the logical operator (!) makes sense since the result of names(cats) == "age" is a logical vector.

@jcoliver
Copy link
Contributor

jcoliver commented Mar 4, 2019

Closing for now, but feel free to re-open after restricting change to updating only the portion about the %in% operator.

@jcoliver jcoliver closed this Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:clarification Suggest change for make lesson clearer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants